home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form AboutBox
- BackColor = &H00FFFFFF&
- BorderStyle = 3 'Fixed Double
- Caption = "About"
- ClientHeight = 1905
- ClientLeft = 1545
- ClientTop = 2115
- ClientWidth = 4920
- ClipControls = 0 'False
- ControlBox = 0 'False
- FillColor = &H00FFFFFF&
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 2310
- Icon = 0
- Left = 1485
- LinkMode = 1 'Source
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 1905
- ScaleWidth = 4920
- Top = 1770
- Width = 5040
- Begin CommandButton BTN_OK
- Caption = "&OK"
- Height = 465
- Left = 1920
- TabIndex = 8
- Top = 1080
- Width = 1200
- End
- Begin Label RegToLabel
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Height = 240
- Left = 0
- TabIndex = 13
- Top = 3000
- Width = 4875
- End
- Begin Label UserNameLabel
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Height = 240
- Left = 0
- TabIndex = 12
- Top = 3175
- Width = 4875
- End
- Begin Label DisclaimerLabel
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "www.errorrdomain.com"
- Height = 1725
- Left = 15
- TabIndex = 11
- Top = 720
- Width = 4875
- End
- Begin Label Lbl_InfoValue
- BackStyle = 0 'Transparent
- Height = 1050
- Left = 2900
- TabIndex = 10
- Top = 2100
- Width = 1900
- End
- Begin Label Lbl_Info
- Alignment = 1 'Right Justify
- BackStyle = 0 'Transparent
- Height = 1050
- Left = 100
- TabIndex = 9
- Top = 2100
- Width = 2600
- End
- Begin Label Label7
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- Height = 240
- Left = 0
- TabIndex = 7
- Top = 1750
- Width = 4875
- End
- Begin Label Label4
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- ForeColor = &H00000000&
- Height = 240
- Left = 0
- TabIndex = 4
- Top = 1290
- Width = 4875
- End
- Begin Label Label3
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- ForeColor = &H00000000&
- Height = 240
- Left = 0
- TabIndex = 3
- Top = 1100
- Width = 4875
- End
- Begin Label Label2
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- ForeColor = &H00000000&
- Height = 240
- Left = 0
- TabIndex = 2
- Top = 900
- Width = 4875
- End
- Begin Label Label1
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- ForeColor = &H00000000&
- Height = 240
- Left = 0
- TabIndex = 1
- Top = 1550
- Width = 4875
- End
- Begin Label LAB_2
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- Caption = "Code by Justo Torres"
- ForeColor = &H00000000&
- Height = 240
- Left = 0
- TabIndex = 0
- Top = 480
- Width = 4875
- End
- Begin Label Label5
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- ForeColor = &H00000000&
- Height = 240
- Left = 0
- TabIndex = 5
- Top = 360
- Width = 4875
- End
- Begin Label LAB_1
- Alignment = 2 'Center
- AutoSize = -1 'True
- BackColor = &H00FFFFFF&
- BackStyle = 0 'Transparent
- Caption = "ErrorR MIDI PLAYER"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 13.5
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00000000&
- Height = 360
- Left = 975
- TabIndex = 6
- Top = 0
- Width = 2925
- End
- DefInt A-Z
- ' API functions used in getting user and company name
- Declare Function LoadLibrary% Lib "Kernel" (ByVal LibFileName$)
- Declare Sub FreeLibrary Lib "Kernel" (ByVal hInst%)
- Declare Function LoadString% Lib "User" (ByVal hInst%, ByVal idResource%, ByVal Buffer$, ByVal cBuffer%)
- ' GetVersion returns both Windows and DOS versions
- Declare Function GetVersion& Lib "Kernel" ()
- ' This function returns a Long that's filled with bit-flags providing
- ' information about Windows.
- Declare Function GetWinFlags& Lib "Kernel" ()
- Const WF_PMODE = &H1
- Const WF_STANDARD = &H10
- Const WF_ENHANCED = &H20
- Const WF_80x87 = &H400
- ' This function returns the amount of free memory
- Declare Function GetFreeSpace& Lib "Kernel" (ByVal wFlags%)
- 'This function returns the free system resources
- Declare Function GetFreeSystemResources% Lib "User" (ByVal fuSysResource%)
- Const GFSR_SYSTEMRESOURCES = 0
- Const GFSR_GDIRESOURCES = 1
- Const GFSR_USERRESOURCES = 2
- Sub BTN_OK_Click ()
- Unload AboutBox
- End Sub
- Function FixAmpersand$ (ByVal Buffer As String)
- Dim N%
- N = 1
- Do Until N = 0
- N = InStr(N, Buffer, "&")
- If N > 0 Then
- Buffer = Left$(Buffer, N) + Mid$(Buffer, N)
- N = N + 2
- End If
- Loop
- Do While Right$(Buffer, 1) = Chr$(0) 'Or Right$(Buffer, 1) = " "
- Buffer = Left$(Buffer, Len(Buffer) - 1)
- Loop
- FixAmpersand = Buffer
- End Function
- Sub Form_Load ()
- Dim WinFlags As Long
- Dim Mode As String, CoProcessor As String
- Move (Screen.Width - Width) \ 2, ((Screen.Height - Height) \ 2 - 200)
- ' Get current Windows configuration
- WinFlags = GetWinFlags()
- If WinFlags And WF_ENHANCED Then
- Mode = "386 Enhanced Mode"
- Else
- Mode = "Standard Mode"
- End If
- Lbl_Info.Caption = Mode + CRLF + "Free Memory:" + CRLF + "Math Co-processor:" + CRLF + "System Resources:"
- If WinFlags And WF_80x87 Then
- CoProcessor = "Present"
- Else
- CoProcessor = "None"
- End If
- I% = GetFreeSystemResources(2)
- Lbl_InfoValue.Caption = CRLF + Format$(GetFreeSpace(0) \ 1024) + " KB" + CRLF + CoProcessor + CRLF + Str(I%) + "%"
- 'Resolution.Caption = "Resolution: " & Screen.Width \ Screen.TwipsPerPixelX & " x " & Screen.Height \ Screen.TwipsPerPixelY
- DisclaimerText$ = " This software and the accompanying files are provided ""as is"" "
- DisclaimerText$ = DisclaimerText$ + "and without warranties as to performance of the software and "
- DisclaimerText$ = DisclaimerText$ + " the accompanying files or any other warranties whether expressed "
- DisclaimerText$ = DisclaimerText$ + " or implied. No warranty of fitness for a particular purpose "
- DisclaimerText$ = DisclaimerText$ + "is offered." + CRLF + CRLF
- DisclaimerText$ = DisclaimerText$ + "You may not sell this software or it's source code." + CRLF
- DisclaimerText$ = DisclaimerText$ + "You may use this code in any way you find useful."
- DisclaimerLabel.Caption = DisclaimerText$
- ' Get access to USER's strings by getting a handle to USER
- Dim hInstUser As Integer
- hInstUser = LoadLibrary("USER")
- FreeLibrary hInstUser
- Dim Buffer As String, Success As Integer, N As Integer
- ' Get the User name
- Buffer = String$(31, 0)
- If LoadString(hInstUser, 514, Buffer, 30) Then
- UserNameLabel.Caption = Trim(FixAmpersand(Buffer))
- End If
- ' Get the Company name
- ' Buffer = String$(31, 0)
- ' If LoadString(hInstUser, 515, Buffer, 30) Then
- ' 'CompanyName$ = FixAmpersand(Buffer)
- ' CompanyLabel.Caption = Trim(FixAmpersand(Buffer))
- ' End If
- End Sub
-